int cmp(int* x, int* y)
{
    return *x - *y;
}

bool canMakeArithmeticProgression(int* arr, int arrSize) {
    qsort(arr, arrSize, sizeof(int), cmp);
    int n = arr[0] - arr[1];
    for (int i = 1; i < arrSize - 1; i++)
    {
        if (arr[i] - arr[i + 1] != n)
        {
            return false;
        }
    }
    return true;
}
